package com.cenwangkeji.resident.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @松 on 2019/11/4 13:15
  健康服务包
 **/

public class ServicePackageBean implements Parcelable {

    /**
     * msg : 操作成功
     * code : 0
     * data : [{"id":6,"name":"老年服务包","content":"60-64岁健康老年人，正常不享受免费体检，签约后享受和65岁老年人相同的体检项目。","createBy":18,"createDate":"2019-06-14 16:28:25","type":1,"member":1,"feedback":"100.00"}]
     */

    private String msg;
    private int code;
    private List<DataBean> data;

    protected ServicePackageBean(Parcel in) {
        msg = in.readString();
        code = in.readInt();
    }

    public static final Creator<ServicePackageBean> CREATOR = new Creator<ServicePackageBean>() {
        @Override
        public ServicePackageBean createFromParcel(Parcel in) {
            return new ServicePackageBean(in);
        }

        @Override
        public ServicePackageBean[] newArray(int size) {
            return new ServicePackageBean[size];
        }
    };

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(msg);
        dest.writeInt(code);
    }

    public static class DataBean implements Parcelable{
        /**
         * id : 6
         * name : 老年服务包
         * content : 60-64岁健康老年人，正常不享受免费体检，签约后享受和65岁老年人相同的体检项目。
         * createBy : 18
         * createDate : 2019-06-14 16:28:25
         * type : 1
         * member : 1
         * feedback : 100.00
         */

        private int id;
        private String name;
        private String content;
        private int createBy;
        private String createDate;
        private int type;
        private int member;
        private String feedback;

        protected DataBean(Parcel in) {
            id = in.readInt();
            name = in.readString();
            content = in.readString();
            createBy = in.readInt();
            createDate = in.readString();
            type = in.readInt();
            member = in.readInt();
            feedback = in.readString();
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel in) {
                return new DataBean(in);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public int getCreateBy() {
            return createBy;
        }

        public void setCreateBy(int createBy) {
            this.createBy = createBy;
        }

        public String getCreateDate() {
            return createDate;
        }

        public void setCreateDate(String createDate) {
            this.createDate = createDate;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public int getMember() {
            return member;
        }

        public void setMember(int member) {
            this.member = member;
        }

        public String getFeedback() {
            return feedback;
        }

        public void setFeedback(String feedback) {
            this.feedback = feedback;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(id);
            dest.writeString(name);
            dest.writeString(content);
            dest.writeInt(createBy);
            dest.writeString(createDate);
            dest.writeInt(type);
            dest.writeInt(member);
            dest.writeString(feedback);
        }
    }
}
